/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package data;

import java.sql.Connection;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
import java.util.*;

/**
 *
 * @author NS
 */
public class List_DefTablespace {
    private Connection conn = null;
    public List_DefTablespace(Connection conn){
        this.conn = conn;
    }
    public ArrayList<String> tblspaceLst(){
        Statement select;
        ArrayList<String> lst = null;
        try{
            lst = new ArrayList<String>();
            select = conn.createStatement();
            System.out.println("SELECT TABLESPACE_NAME FROM USER_TABLESPACES");
            ResultSet rs = select.executeQuery("SELECT TABLESPACE_NAME FROM USER_TABLESPACES");
            while(rs.next()){
                String r = rs.getString(1);
                //System.out.println(r);
                lst.add(r);
            }
        }catch(SQLException e){
            
        }
        return lst;
    }
}
